-- GENERATED SPELL FOR [Sargeron Hellcaller] --


function spell0_20902(pUnit, Event) --@Curse of the Elements,n/a--
pUnit:FullCastSpellOnTarget(36831,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20902', 611, 1)
end

function spell1_20902(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(36832,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20902', 1500, 1)
end

function spell2_20902(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(38918,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20902', 1500, 1)
end

function Sorts_20902(pUnit, Event)
local choix_sorts_20902 = math.random(0, 2)
if choix_sorts_20902 == 0 then
pUnit:RegisterEvent('spell0_20902', 1, 1)
end
if choix_sorts_20902 == 1 then
pUnit:RegisterEvent('spell1_20902', 1, 1)
end
if choix_sorts_20902 == 2 then
pUnit:RegisterEvent('spell2_20902', 1, 1)
end
end

function mob20902_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20902', math.random(1500, 3000), 1)
end

function mob20902_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20902_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20902_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20902, 1, 'mob20902_Action')
RegisterUnitEvent(20902, 2, 'mob20902_Leave')
RegisterUnitEvent(20902, 3, 'mob20902_Kill')
RegisterUnitEvent(20902, 4, 'mob20902_Die')
